jmp near start

text db 'Label Offset: '
number db 0,0,0,0,0

start:
mov ax,0x07c0
mov ds,ax
mov ax,0xb800
mov es,ax

cld
mov si,text
mov di,0
mov cx,number-text

display:
    movsb
    mov byte [es:di],0x07
    inc di
    loop display

; 分解数位
mov ax,number
mov si,10
mov bx,ax
mov cx,5
calc:
    xor dx,dx
    div si
    mov [bx],dl
    inc bx
    loop calc
; 显示数位
mov si,4
mov bx,number
dn:
    mov al,[bx+si]
    add al,0x30
    mov ah,0x40

    mov [es:di],ax
    add di,2
    dec si
    jns dn

jmp near $

times 510-($-$$) db 0
db 0x55,0xAA

